﻿<frame:CFrame xmlns:my2="clr-namespace:SLControls.Controls;assembly=SLControls"  x:Class="VAdvantage.Framework.UserPreference" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                 xmlns:frame="clr-namespace:VAdvantage.Apps"
                 xmlns:provider="clr-namespace:SilverlightDesktop.Controls;assembly=SilverlightDesktop"
           Title="UserPreference Page" xmlns:my="clr-namespace:VAdvantage.Controls" 
              xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:my1="clr-namespace:VAdvantage.Panels" Height="465" Width="442" Loaded="CFrame_Loaded">
    <Grid x:Name="LayoutRootU" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" ></RowDefinition>
            <RowDefinition Height="Auto" ></RowDefinition>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <my:VTabControl x:Name="LoginTab" Grid.Row="0" VerticalAlignment="Stretch" Opacity="2">
            <my:VTabControl.Background>
                <LinearGradientBrush>
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="White" Offset="1" />
                </LinearGradientBrush>
            </my:VTabControl.Background>
            <my:VTabControl.BorderBrush>
                <LinearGradientBrush>
                    <GradientStop Color="#FF8D9FAE" Offset="0.254" />
                </LinearGradientBrush>
            </my:VTabControl.BorderBrush>
            <sdk:TabItem Header="Preference" Name="IniLoginTab">
                <Grid Background="Transparent">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    
                    <my:VTextBox Grid.Row="0" x:Name="txtConnectionDetail" Margin="5" Height="50" TextWrapping="Wrap" VerticalContentAlignment="Stretch"  />
                    <my:VButton Content="Button" Grid.Row="1" Height="23" x:Name="cmdRole" Margin="5" Width="75" VerticalContentAlignment="Stretch" VerticalAlignment="Top" HorizontalAlignment="Right" HorizontalContentAlignment="Center" Click="cmdRole_Click" />
                    <Grid Name="grid1" Grid.Row="2" Background="Transparent" HorizontalAlignment="Center" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="10" Width="Auto" />
                            <ColumnDefinition MinWidth="10" Width="Auto"  />
                            <ColumnDefinition MinWidth="10" Width="Auto"/>
                            <ColumnDefinition Width="53*" />
                        </Grid.ColumnDefinitions>
                        <my:VLabel Grid.Row="4" Height="16" HorizontalAlignment="Right" Margin="0,8,5,6" x:Name="lblTraceLevel" VerticalAlignment="Center" Width="73" Content="Trace Level" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Automatic Commit" Grid.Column="1" Height="25" HorizontalAlignment="Left"  x:Name="chkAutoCommit" VerticalAlignment="Bottom" FlowDirection="LeftToRight" Width="125" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Automatic Login" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkAutoLogin" VerticalAlignment="Bottom" Width="125" Grid.Column="1" Grid.Row="1" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Show Advanced Tabs" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkShowAdvancedTab" VerticalAlignment="Bottom" Width="139" Grid.Column="1" Grid.Row="3" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Show Accounting Tabs" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkShowAccountingTab" VerticalAlignment="Bottom" Width="155" Grid.Column="1" Grid.Row="2" VerticalContentAlignment="Stretch" Grid.ColumnSpan="1" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Store Password" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkStorePassword" VerticalAlignment="Bottom" Width="125" Grid.Column="2" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Show Translation Tab" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkShowTranslationTab" VerticalAlignment="Bottom" Width="148" Grid.Column="2" Grid.Row="1" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Automatic New Record" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkAutoNewRecord" VerticalAlignment="Bottom" Width="148" Grid.Column="2" Grid.Row="2" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Cache Windows" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkCacheWindows" VerticalAlignment="Bottom" Width="125" Grid.Column="2" Grid.Row="3" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Trace File" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkTraceFile" VerticalAlignment="Bottom" Width="125" Grid.Column="2" Grid.Row="4" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Always Preview Print" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch"  x:Name="chkPreviewPrint" VerticalAlignment="Bottom" Width="148" Grid.Column="2" Grid.Row="5" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Dictionary Maintainence" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkDictionaryMaintain" VerticalAlignment="Bottom" Width="158" Grid.Column="2" Grid.Row="6" VerticalContentAlignment="Stretch"  />
                        <my:VCheckBox Margin="2,2,2,0" Content="Show Tennent-Org" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch"  x:Name="chkClientOrg" Visibility="Collapsed" VerticalAlignment="Bottom" Width="125" Grid.Column="2" Grid.Row="7" VerticalContentAlignment="Stretch" />
                        <my:VLabel Grid.Row="7" Height="16" HorizontalAlignment="Right" Margin="0,6,7,8" x:Name="vlblClientOrg" VerticalAlignment="Center"  Content="Show" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" />
                        <my:VLabel Grid.Row="8" Height="16" HorizontalAlignment="Right" Margin="0,6,7,8" x:Name="vlblPageSize" VerticalAlignment="Center"  Content="Page Size" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" />
                        <my:VComboBox Margin="2,2,2,0" HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="cmbPageSize"  Width="125" Grid.Column="1" Grid.Row="8" VerticalContentAlignment="Stretch" />
                        <my:VComboBox Margin="2,2,2,0" HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="cmbClientOrg"  Width="125" Grid.Column="1" Grid.Row="7" VerticalContentAlignment="Stretch" />
                        <my:VCheckBox Margin="2,2,2,0" Content="Show Mini Grid" FlowDirection="LeftToRight" Height="25" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" x:Name="chkShowMiniGrid" VerticalAlignment="Bottom" Width="125" Grid.Column="2" Grid.Row="7" VerticalContentAlignment="Stretch" />
                        <my:VLabel Grid.Row="5" Height="21" HorizontalAlignment="Right" Margin="0,2,6,3" x:Name="vlblPrinterText" VerticalAlignment="Center" Width="62" Content="Printer" HorizontalContentAlignment="Stretch" />
                        <my:VLabel Grid.Row="6" Height="16" HorizontalAlignment="Right" Margin="0,6,7,8" x:Name="vlblDateText" VerticalAlignment="Center" Width="61" Content="Date" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" />
                        <my:VDatePicker Margin="2,0,0,0" Grid.Column="1" Grid.Row="6" Height="25" HorizontalAlignment="Left"  x:Name="dtDate" VerticalAlignment="Top" Width="120" />
                        <my:VComboBox Margin="2,0,0,0" Grid.Row="4" Height="23" HorizontalAlignment="Left"  x:Name="cmbTraceLevel" VerticalAlignment="Top" Width="120" Grid.Column="1" />
                        <my:VComboBox Margin="2,0,0,0" Grid.Row="5" Height="23" HorizontalAlignment="Left" x:Name="cmbPrinter" VerticalAlignment="Top" Width="120" Grid.Column="1" />
                    </Grid>
                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="Context" Name="HelpTab">
                <Grid Background="Transparent">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="3*">
                        </RowDefinition>
                        <RowDefinition Height="*">
                        </RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*">
                        </ColumnDefinition>
                        <ColumnDefinition Width="2*">
                        </ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <ListBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Name="lstContext" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"  SelectionChanged="lstContext_SelectedIndexChanged" />
                    <TextBox Background="LightGray" IsReadOnly="True" Margin="0,4,2,2" VerticalContentAlignment="Center" TextAlignment="Center" HorizontalContentAlignment="Center" Grid.Row="1" Grid.Column="0" x:Name="lblVariableName" TextWrapping="Wrap"  />
                    <TextBox Background="LightGray" IsReadOnly="True" Margin="2,4,0,1" VerticalContentAlignment="Center" TextAlignment="Center" HorizontalContentAlignment="Center" Grid.Row="1" Grid.Column="1" x:Name="lblVariableValue" TextWrapping="Wrap" />
                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="Errors" Name="tabError">
                <Grid Name="grid2" Background="Transparent">
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <my2:VDataGrid AutoGenerateColumns="False" RowHeight="30"  Name="vdgvError" Margin="0,0,0,2"  />
                    <!--<sdk:DataGrid />-->
                    <Grid Grid.Row="1" Margin="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                    <Button Grid.Column="3" Content="Save to file" Name="vbtnSaveToFile" Margin="2" Width="89" HorizontalAlignment="Right" Height="25" Click="vbtnSaveToFile_Click" />
                    <Button Grid.Column="2" Content="Send Mail"  Name="vbtnSentMail"     Margin="2" Width="77" Height="25" Click="vbtnSentMail_Click" />
                    <Button Grid.Column="1" Content="Reset"    Name="vbtnReset"  Width="69" Margin="2" Height="25" Click="vbtnReset_Click" />
                        <CheckBox Grid.Column="0" Content="ErrorOnly" Name="vchkErrorOnly" Margin="2" Width="85" Background="{x:Null}" Height="25" HorizontalAlignment="Right" Unchecked="vchkErrorOnly_CheckedChanged" Checked="vchkErrorOnly_CheckedChanged" ></CheckBox>
                    </Grid>
                </Grid>
            </sdk:TabItem>
        </my:VTabControl>
        <my:VStatusBar x:Name="VStatusBar" Grid.Row="2"    />
        <StackPanel Grid.Row="1" Name="stackPanel1" Orientation="Horizontal" FlowDirection="RightToLeft" >
            <my:VButton Margin="2" Height="35" x:Name="btnOk" Width="35" Click="btnOK_Click" >
                <Image Source="/VAdvantage;component/Images/right_up.png" Stretch="Fill"></Image>
            </my:VButton>
            <my:VButton Margin="2" Height="35" x:Name="btnCancel" Width="35" Click="btnCancel_Click" >
                <Image Source="/VAdvantage;component/Images/cancel_up.png" Stretch="Fill"></Image>
            </my:VButton>
        </StackPanel>
    </Grid>
</frame:CFrame>
